package com.alex.structs2.interceptor;


import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class LogInterceptor implements Interceptor {

	private static final long serialVersionUID = 6603647481383454329L;
	
	public void destroy() {
		System.out.println("-------destroy------");
	}

	public void init() {
		System.out.println("-------init------");
	}

	public String intercept(ActionInvocation inv) throws Exception {
		System.out.println("before invoke...");
		String result = inv.invoke();
		System.out.println("after invoke...");
		return result;
	}

}
